import java.awt.JobAttributes;

public class Demo8 {
	public static void main(String[] args) {
		Thread t1 = new Thread(()->{
			while(true) {
				System.out.println(Thread.currentThread().getName()+"hello world");
				try {
					Thread.sleep(1000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		});
		t1.start();
		
		Thread t2 = new Thread(()->{
			while(true) {
				System.out.println(Thread.currentThread().getName()+"hello");
				try {
					Thread.sleep(1000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		});
		t2.start();
		
	}

}
